<template>
  <div class="main-container">
    <div class="home-icon">
      <!--  @click="go('/Home')" -->
      <i></i>
    </div>
    <!-- left-text="返回" left-arrow -->
    <div class="main-info">
      <van-swipe class="my-swipe" :autoplay="7000" indicator-color="white">
        <!-- <van-swipe-item>1</van-swipe-item>
        <van-swipe-item>2</van-swipe-item>
        <van-swipe-item>3</van-swipe-item>
        <van-swipe-item>4</van-swipe-item> -->
        <van-swipe-item
          ><img src="../assets/first.jpg" alt=""
        /></van-swipe-item>
        <van-swipe-item
          ><img src="../assets/second.jpg" alt=""
        /></van-swipe-item>
        <van-swipe-item
          ><img src="../assets/third.jpg" alt=""
        /></van-swipe-item>
        <van-swipe-item
          ><img src="../assets/fouth.jpg" alt=""
        /></van-swipe-item>
      </van-swipe>
      <div class="main-content">
        <div class="top">
          <h2 class="survey-title">公司概况</h2>
          <p class="surveyImg">
            <img src="../assets/companySur.jpg" alt="" />
          </p>
          <ul class="introduce">
            <li>
              邓州市医药有限公司成立于1956年9月，是邓州市委、市政府管理的一级单位。公司现有干部职工520人，公司内设综合办公室、人事科、财务科、质管科、企管科、业务科、保卫科等七个科室。
            </li>
            <li>
              下设药品配送中心1个、药品零售门店186家，经营网点遍布城乡，是保障全市180万人民群众用药需求的国有企业。
            </li>
            <li>
              公司秉承“以人为本、和而不同”的企业发展理念，倾力打造一个融合、
              友爱、进取的发展环境，夯实公司跨越式发展的基础。
            </li>
            <li>
              公司十分重视产品质量和售后服务，一直本着“以人为本、以诚取信、以质取胜、以新争天下”的质量方针和“正正直直做人，踏踏实实做事”的企业精神。
            </li>
          </ul>
        </div>
        <div class="top">
          <h2 class="survey-title">经营范围</h2>
          <p class="surveyImg">
            <img src="../assets/business.jpg" alt="" />
          </p>
          <ul class="introduce">
            <li>
              中成药、化学药制剂、抗生素、生化药品、生物制品（除疫苗）、诊断药品
              、中药材、中药饮片、 医疗器械、 保健食品。
            </li>
            <li>
              化妆品、卫生用品、日用品、体外诊断试剂、百货、玩具、小针织、家用电器、健身器材、钟表、塑料制品、预包装食品、散装食品、奶粉销售
            </li>
          </ul>
        </div>
        <div class="main-footer">
          <p class="company-info">
            Copyright 邓州市医药有限公司 版权所有2020-2021 苏ICP备17036427号-2
            推广电话：16639944888
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { CellGroup, List, Swipe, SwipeItem, NavBar, Toast } from 'vant';
import CompanyIcon from '@/components/CompanyIcon';
import api from '@/api';
const { product } = api;

export default {
  components: {
    CompanyIcon,
    [CellGroup.name]: CellGroup,
    [List.name]: List,
    [Swipe.name]: Swipe,
    [SwipeItem.name]: SwipeItem,
    [NavBar.name]: NavBar,
    [Toast.name]: Toast,
  },

  data() {
    return {
      goods: [],
      loading: false,
      finished: false,
      currentPage: 0,
      pageCount: 0,
      imgbox: [],
    };
  },
  created() {
    this.imgbox = [
      { name: 'first', src: '../assets/first.jpg' },
      { name: 'second', src: '../assets/second.jpg' },
      { name: 'third', src: '../assets/third.jpg' },
      { name: 'fouth', src: '../assets/fouth.jpg' },
    ];
  },
  mounted(){
    document.body.scrollIntoView()
  },
  methods: {
    onLoad() {
      product
        .getHomeProductList({
          page: this.currentPage + 1,
          pageSize: 10,
        })
        .then((res) => {
          if (res.code !== 0) return;
          this.pageCount = res.pager.pageCount;
          this.goods.push(...res.items);
          if (++this.currentPage >= this.pageCount) {
            this.finished = true;
          }
          this.loading = false;
        });
    },
    handleClick(id) {
      this.$router.push(`/good-pre/${id}`);
    },
  },
};
</script>

<style scoped>
.main-container {
  margin-bottom: 50px;
  overflow: hidden;
}
.main-info {
  padding: 20px;
  box-sizing: border-box;
  margin-top: 50px;
}
.home-icon {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1;
  height: 50px;
  line-height: 50px;
  background-color: #fff;
}
.home-icon > i {
  display: inline-block;
  height: 100%;
  width: 400px;
  background: url('../assets/logo-company.png') no-repeat 0 0;
  background-size: contain;
}
.my-navbar .van-nav-bar {
  background-color: #fff;
  line-height: 50px;
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  height: 210px;
  line-height: 210px;
  text-align: center;
  background-color: #39a9ed;
}
.my-swipe .van-swipe-item img {
  display: inline-block;
  /* width: 100%; */
  height: 100%;
  max-width: 100%;
}
.main-content {
  width: 100%;
  height: auto;
  margin: 0 auto;
  background-image: url('../assets/beijing.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  margin-top: 20px;
}
.top {
  overflow: hidden;
}
.survey-title {
  font-size: 25px;
  text-align: center;
  color: rgb(90, 94, 102);
  font-family: 华文新魏;
  margin: 0;
  margin: 10px 0;
}
.surveyImg {
  /* width: 2rem;
  height: 2rem; */
  text-align: center;
  margin: 0;
  /* background-image: url('../assets/companySur.jpg');
  background-position: center;
  background-size: 100%; */
}
.surveyImg > img {
  height: 200px;
}
.introduce {
  padding: 0 30px;
  box-sizing: border-box;
}
.introduce > li {
  list-style: disc;
  margin-top: 25px;
  font-family: 微软雅黑, 'Microsoft YaHei';
  font-size: 16px;
  color: rgb(102, 102, 102);
}
.main-footer .company-info {
  margin: 0;
  padding: 20px;
  font-size: 13px;
  text-align: center;
}
</style>
